<!DOCTYPE html>
<html>
<head>
    <title>{$hd.config.webname}</title>
    <link rel="shortcut icon" href="favicon.ico">
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <hdjs/>
    <jquery/>
    <bootstrap/>
    <link rel="stylesheet/less" href="__TEMPLATE__/css/article.less?ver=1.0 "/>
    <script type="text/javascript" src="__ROOT__/hd/static/js/hdcms.js"></script>
    <link rel="stylesheet/less" href="__ROOT__/hd/static/css/hdcms.less?ver=1.0 "/>
    <!--[if lt IE 8]>
    <link rel="stylesheet/less" href="__TEMPLATE__/css/ie.less?ver=1.0 "/>
    <![endif]-->
    <less/>
</head>
<body>
<article class="header container">
    <h1>{$hd.config.webname}</h1>
    <!--导航-->
    <nav class=".navbar-fixed-top" role="navigation">
        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="active"><a href="__ROOT__">首页</a></li>
                <channel type="top">
                    <li><a href='{$field.url}'>{$field.catname}</a></li>
                </channel>
            </ul>
            <form class="navbar-form navbar-left" role="search" method="post"
                  action="__WEB__?g=Hdcms&a=Search&c=Search&m=search">
                <div class="form-group">
                    <input type="hidden" name='type' class="form-control" value="tag">
                    <input type="text" name='word' class="form-control" placeholder="输入关键字搜索">
                </div>
                <button type="submit" class="btn btn-primary">搜索</button>
            </form>
            <script type="text/javascript" src="__WEB__?a=Login&c=User&m=user&g=Member"></script>
        </div>
    </nav>
</article>
<!--最新消息-->
<div class="top-message container">
    <span>最新消息：</span>
    <a href="http://www.hdphp.com">HDPHP 2014.03 发布</a>
</div>
<!--内容主体-->
<div class="content container">
<div class="row">
<div class="col-md-8">
    <!--内容主体-->
    <div id="main">
        <header>你的位置：
            <location sep="&nbsp;&gt;&nbsp;"/>
        </header>
        <div class="title">
            <h2>{$hdcms.title}</h2>

            <p>
                <a href="#">{$hdcms.author}</a> 发表于 {$hdcms.date_before} ({$hdcms.time}) -
                <a href="#">{$hdcms.commentnum}条评论</a> 所属分类：<a href="{$hdcms.caturl}">{$hdcms.catname}</a>
                <a href="javascript:add_favorite({$hdcms.mid},{$hdcms.cid},{$hdcms.aid})">加入收藏</a>
            </p>
        </div>
        <div class="content">
            {$hdcms.content}
        </div>
        <div class="tag">
            <if value="$hdcms.tag">
                继续浏览有关 {$hdcms.tag} 的文章
            </if>
        </div>
        <!--下一篇与下一篇-->
        <div class="next-article row">
            <p class="col-md-6">
                上一篇
                <pagenext pre="" type="pre" titlelen="18"/>
            </p>

            <p class="col-md-6">
                下一篇
                <pagenext next="" type="next" titlelen="18"/>
            </p>
        </div>
        <!--与本文相关文章-->
        <div class="related">
            <header>与本文相关的文章</header>
            <ul>
                <arclist type="relative" titlelen="25" row="6">
                    <li>
                        <a href="{$field.url}">{$field.title}</a>
                    </li>
                </arclist>
            </ul>
        </div>
    </div>
    <!--发表评论-->
    <script type="text/javascript" id="comment" src="__WEB__?a=Comment&c=Comment&m=show&mid={$hdcms.mid}&cid={$hdcms.cid}&aid={$hdcms.aid}&comment_id={$hd.get.comment_id}"></script>
</div>
<!--右侧列表-->
<div class="right-list col-md-4">
    <a href="__WEB__/index.php?a=Home&c=Content&m=add&g=Member&cid={$hd.get.cid}" class="publish">
        <strong>+</strong>发表文章
    </a>
    <!--热门标签-->
    <article class="tag">
        <header>
            标签云
        </header>
        <div>
            <tag row="30" type="hot">
                <a href="{$field.url}">{$field.tag}</a>
            </tag>
            <!--Tag随机变色-->
            <script>
                $(".tag div a ").each(function (i) {
                    var color = ['red', '#428BCA', '#5CB85C', '#D9534F', '#567E95', '#FF8433', '#4A4A4A', '#5CB85C', '#B433FF', '#33BBBA', '#C28F5B'];
                    var t = Math.floor(Math.random() * color.length);
                    $(this).css({'background-color': color[t]});
                })
            </script>
        </div>
    </article>
    <!--精英-->
    <article class="reader">
        <header>精英</header>
        <section>
            <user row="14">
                <a href="{$field.url}">
                    <img src="{$field.icon}" title="{$field.nickname}" style="width: 50px;height: 50px;border-radius: 10%;"/>
                </a>
            </user>
        </section>
    </article>
    <!--最新评论-->
    <article class="comment">
        <header>最新评论</header>
        <comment row="6" contentlen="20">
            <section>
                <a href="{$field.url}">
                    <img src="{$field.icon}" style="width: 36px;height: 36px;border-radius: 50%;"/>

                    <p class="man">
                        <span>{$field.nickname}</span> {$field.pubtime}说：
                    </p>

                    <p class="content">
                        {$field.content}
                    </p>
                </a>
            </section>
        </comment>
    </article>
    <!--猜你喜欢-->
    <article class="news">
        <header>
            猜你喜欢
        </header>
        <arclist type="rand" row="5" titlelen="22">
            <section>
                <a href="{$field.url}">
                    <h3>{$field.title}</h3>

                    <p>
                        {$field.time}
                    </p>
                </a>
            </section>
        </arclist>
    </article>
</div>
</div>
</div>
<!--copyright-->
<footer class="container">
    后盾网PHP培训是国内唯一拥有开源框架与开源CMS系统的培训机构！ © 2014 <a href="http://www.houdunwang.com">后盾网</a>
</footer>
</body>
</html>